home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94b.txt / 000061_icon-group-sender _Tue Sep 20 15:41:27 1994.msg < prev    next >
Internet Message Format  |  1995-02-09  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 20 Sep 1994 14:33:31 MST
  2. From: "Art Eschenlauer" <eschen@molbio.cbs.umn.edu>
  3. Message-Id: <9409202041.AA18914@molbio.cbs.umn.edu>
  4. Subject: Question: conjunction in Icon and C
  5. To: icon-group@cs.arizona.edu (icon-group@cs.arizona.edu)
  6. Date: Tue, 20 Sep 1994 15:41:27 -0500 (CDT)
  7. X-Mailer: ELM [version 2.4 PL23]
  8. Mime-Version: 1.0
  9. Content-Type: text/plain; charset=ISO-8859-1
  10. Content-Transfer-Encoding: 8bit
  11. Content-Length: 486       
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13.  
  14. Hi:
  15.  
  16. I have a C question that Icon'ers are more likely to understand than the
  17. average run-of-the-mill C programmer, so here goes.
  18.  
  19. In Icon, if I say:
  20. if <expr1> & <expr2> then <expr3> else <expr4>
  21. and <expr1> fails, <expr2> will not be evaluated.
  22.  
  23. In C, if I say:
  24. if ( <expr1> && <expr2> ) <expr3>; else <expr4>;
  25. and <expr1> has a value of zero (NULL, etc.), is it defined (in the ANSI 
  26. standard, I guess) whether <expr2> will be evaluated or is this compiler 
  27. specific?
  28.  
  29. Thanks,
  30. -Art
  31.  
  32.